function [ M ] = tensorProductRule( x, y )
%TENSORPRODUCTRULE Summary of this function goes here
%   Detailed explanation goes here

s = 1;
Gs = [0, 0];
A = [x^2 + y^2, x^2 + 2 * y^2; 2 * x^2 + y^2, 2 * x^2 + 2 * y^2];
GA = zeros(2, 2, 2);

GA(1,1,1) = 2 * x;
GA(1,1,2) = 2 * y;
GA(1,2,1) = 2 * x;
GA(1,2,2) = 4 * y;
GA(2,1,1) = 4 * x;
GA(2,1,2) = 2 * y;
GA(2,2,1) = 4 * x;
GA(2,2,2) = 4 * y;

GsA = reshape(kron(Gs, A), 2, 2, 2);
GAs = GA * s;

M = GsA + GAs;

end

